<template>
  <div class="reportFormPage">
    <div class="report-dom">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">
            <span>第</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.page }}&nbsp;</span>
            <span>页，共</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.totalPage }}&nbsp;</span>
            <span>页</span>
          </div>
        </el-col>
      </el-row>

      <div class="topTwoBox">
        <div class="centerName">无机结合料稳定材料延迟时间试验检测记录表</div>
        <div class="codeText">
          <tr>
            JGLQ09006
          </tr>
        </div>
      </div>
      <div class="threeTopBox">
        <div class="left-border">
          <div class="box-title">检测单位名称：</div>
          <div class>{{ form.jiancdwmc }}</div>
        </div>
        <div class="right-border">
          <span>记录编号：</span>
          <span class="placeholder">{{ form.jilbh }}</span>
        </div>
      </div>
      <div class="table-border">
        <!-- .........................1111111111111111111111111111111......................................................... -->
        <table height="200px" class="top-table" align="center">
          <tbody>
            <tr>
              <td height="40" align="center" width="15%">
                <span style="width: 90px; display: inline-block">工程名称</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcmc }}</span>
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">工程部位/用途</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcbwyt }}</span>
              </td>
            </tr>
            <tr>
              <td height="40" align="center">样品信息</td>
              <td class="specimen-border" colspan="3">
                <span>样品名称：</span>
                <span :class="{ placeholder: !form.yangpmc }">{{ form.yangpmc }}</span>
                <span>；样品编号：</span>
                <span :class="{ 'placeholder-long': !form.yangpbh }">{{ form.yangpbh }}</span>

                <span>；样品数量：</span>
                <span :class="{ placeholder: !form.yangpsl }">{{ form.yangpsl }}</span>
                <span>；样品状态：</span>
                <span :class="{ placeholder: !form.yangpzt }">{{ form.yangpzt }}</span>
                <span>；来样时间：</span>
                <span :class="{ placeholder: !form.yangpsj }">{{ form.yangpsj }}</span>
              </td>
            </tr>

            <tr>
              <td height="30" align="center" width="15%">
                <span style="width: 90px; display: inline-block">试验检测日期</span>
              </td>
               <!-- <td width="35%" class="text-center">{{ form.shiyjcrq }}</td> -->                                            
 <td width="35%" class="text-center">
      <el-input v-model="form.shiyjcrq" />
</td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">试验条件</span>
              </td>
              <td v-if="isPdf" width="35%">
                温度：
                <span style="display: inline-block; width: 10%">{{ form.shiytjwd }}</span>
                ℃；湿度：
                <span style="display: inline-block; width: 10%">{{ form.shiytjsd }}</span
                >%RH
              </td>
              <td v-else width="35%">
                温度：
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjwd" class="height100" style="width: 15%" />℃；湿度：
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjsd" class="height100" style="width: 15%" />%RH
              </td>
            </tr>

            <tr>
              <td height="40" align="center" width="15%">
                <span style="width: 90px; display: inline-block">检测依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.jiancyj }}</span>
                <el-input v-else type="textarea" v-model="form.jiancyj" :rows="2" class="mark" @dblclick.native="showBsJiancyjView" readonly />
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">判定依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.pandyj }}</span>
                <el-input v-else type="textarea" v-model="form.pandyj" :rows="2" @dblclick.native="showBsJudgeBaseView" @focus="handleFocus('pandyj')" class="mark" />
              </td>
            </tr>
            <tr class="bottom-border">
              <td height="40" align="center">
                <div>主要仪器设备</div>
                <div>名称及编号</div>
              </td>
              <td colspan="3">
                <span v-if="isPdf">{{ form.zhuyyqsbmcjbh }}</span>
                <el-input v-else type="textarea" :rows="2" v-model="form.zhuyyqsbmcjbh" class="height100 width100 mark" @dblclick.native="showBsInstrumentView" readonly></el-input>
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .................................22222222222222222222222222222222............................................... -->
        <table height="300px" class="middle-table">
          <tbody>
            <tr trindex="1">
              <td colspan="1" class="td1" rowspan="1" height="35">试件数量(个)</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input v-model="form.shijsl" @keydown.native="handleKeyDown($event, 0, 0)" :ref="'0_0'" />
              </td>
              <td colspan="1" class="td1" rowspan="1">试件尺寸(mm)</td>
              <td colspan="2" class="td1" rowspan="1">
                <el-input v-model="form.shijcc" @focus="handleFocus('shijcc')" @keydown.native="handleKeyDown($event, 0, 1)" :ref="'0_1'" />
              </td>
              <td colspan="1" class="td1" rowspan="1">试件制备方法</td>
              <td colspan="2" class="td1" rowspan="1">
                <el-input v-model="form.shijzbff" @keydown.native="handleKeyDown($event, 0, 2)" :ref="'0_2'" />
              </td>
              <td colspan="1" class="td1" rowspan="1">成型压实度(%)</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input v-model="form.chengxysd" @keydown.native="handleKeyDown($event, 0, 3)" :ref="'0_3'" />
              </td>
            </tr>
            <tr trindex="2">
              <td colspan="1" class="td1" rowspan="1" height="35">加载速率(mm/min)</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input v-model="form.jiazsl" @keydown.native="handleKeyDown($event, 1, 0)" :ref="'1_0'" />
              </td>
              <td colspan="1" class="td1" rowspan="1">最大干密度(g/cm<sup>3</sup>)</td>
              <td colspan="2" class="td1" rowspan="1">
                <el-input v-model="form.zuidgmd" @keydown.native="handleKeyDown($event, 1, 1)" :ref="'1_1'" />
              </td>
              <td colspan="1" class="td1" rowspan="1">最佳含水率(%)</td>
              <td colspan="2" class="td1" rowspan="1">
                <el-input v-model="form.zuijhsl" @keydown.native="handleKeyDown($event, 1, 2)" :ref="'1_2'" />
              </td>
              <td colspan="1" class="td1" rowspan="1">稳定剂剂量(%)</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input v-model="form.wendjjl" @keydown.native="handleKeyDown($event, 1, 3)" :ref="'1_3'" />
              </td>
            </tr>
            <tr trindex="3">
              <td colspan="1" class="td1" rowspan="1" height="35">矿料掺配比例</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input v-model="form.kuanglcpbl" @keydown.native="handleKeyDown($event, 2, 0)" :ref="'2_0'" />
              </td>
              <td colspan="1" class="td1" rowspan="1">制件日期</td>
              <td colspan="2" class="td1" rowspan="1">
                <span v-if="isPdf">{{ form.zhijrq }}</span>
                <el-date-picker v-else v-model="form.zhijrq" type="date" class="hide-icon width100" format="yyyy年MM月dd日" value-format="yyyy年MM月dd日"></el-date-picker>
              </td>
              <td colspan="1" class="td1" rowspan="1">养生龄期(d)</td>
              <td colspan="2" class="td1" rowspan="1">
                <span v-if="isPdf">{{ form.lingq }}</span>
                <el-select v-else v-model="form.lingq" class="hide-icon width100 height100" placeholder>
                  <el-option v-for="item in lingqOptions" :key="item" :label="item" :value="item"></el-option>
                </el-select>
              </td>
              <td colspan="1" class="td1">设计强度(MPa)</td>
              <td colspan="1" class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shejqd" @blur="setWdclphbsjBgYcsj()" @keydown.native="handleKeyDown($event, 2, 1)" :ref="'2_1'" />
              </td>
            </tr>
            <tr>
              <td colspan="2" class="td1" rowspan="1" height="35">成型时间</td>
              <td colspan="2" class="td1" rowspan="1">
                <span v-if="isPdf">{{ form.chengxsj }}</span>
                <el-time-picker v-else v-model="form.chengxsj" class="hide-icon width100" format="HH:mm" value-format="HH:mm"></el-time-picker>
              </td>
              <td colspan="2" class="td1" rowspan="1">浸水时间</td>
              <td colspan="2" class="td1" rowspan="1">
                <span v-if="isPdf">{{ form.jinssj }}</span>
                <el-time-picker v-else v-model="form.jinssj" class="hide-icon width100" format="HH:mm" value-format="HH:mm"></el-time-picker>
              </td>
              <td colspan="1" class="td1" rowspan="1">延迟时间</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.yancsjNum" @blur="setWdclycsjBgTestData()" @keydown.native="handleKeyDown($event, 3, 0)" :ref="'3_0'" />
              </td>
            </tr>
            <tr trindex="4">
              <td colspan="1" class="td1" rowspan="1" height="50">试件号</td>
              <td colspan="1" class="td1" rowspan="1">养生前试件质量m<sub>2</sub>(g)</td>
              <td colspan="1" class="td1" rowspan="1">浸水前试件质量m<sub>3</sub>(g)</td>
              <td colspan="1" class="td1" rowspan="1">浸水后试件质量m<sub>4</sub>(g)</td>
              <td colspan="1" class="td1" rowspan="1">养生期间的质量损失m<sub>2</sub>-m<sub>3</sub>(g)</td>
              <td colspan="1" class="td1" rowspan="1">吸水量m<sub>4</sub>-m<sub>3</sub>(g)</td>
              <td colspan="1" class="td1" rowspan="1">养生前试件的高度h<sub>1</sub>(mm)</td>
              <td colspan="1" class="td1" rowspan="1">浸水后试件的高度h<sub>2</sub>(mm)</td>
              <td colspan="1" class="td1" rowspan="1">检测最大压力P(N)</td>
              <td colspan="1" class="td1" rowspan="1">无侧限抗压强度R<sub>c</sub>(MPa)</td>
            </tr>
            <template v-for="(item, index) in form.baDetailVos">
              <tr trindex="5">
                <td colspan="1" class="td1" rowspan="1">{{ index + 1 }}</td>
                <td colspan="1" class="td1" rowspan="1" height="30px">
                  <!-- {{ `${index + 4}_0` }} -->
                  <el-input
                    :type="isPdf ? 'string' : 'number'"
                    v-model="item.yangsqsjzl"
                    @blur="calculateYangsqjdzlsh(index)"
                    @keydown.native="handleKeyDown($event, index + 4, 0)"
                    :ref="`${index + 4}_0`"
                  />
                </td>
                <td colspan="1" class="td1" rowspan="1">
                  <el-input :type="isPdf ? 'string' : 'number'" v-model="item.qinsqsjzl" @blur="qinsqsjzlChange(index)" @keydown.native="handleKeyDown($event, index + 4, 1)" :ref="`${index + 4}_1`" />
                </td>
                <td colspan="1" class="td1" rowspan="1">
                  <el-input :type="isPdf ? 'string' : 'number'" v-model="item.qinshsjzl" @blur="calculateXisl(index)" @keydown.native="handleKeyDown($event, index + 4, 2)" :ref="`${index + 4}_2`" />
                </td>
                <td colspan="1" class="td1" rowspan="1">
                  <el-input :type="isPdf ? 'string' : 'number'" v-model="item.yangsqjdzlsh" disabled />
                </td>
                <td colspan="1" class="td1" rowspan="1">
                  <el-input :type="isPdf ? 'string' : 'number'" v-model="item.xisl" disabled />
                </td>
                <td colspan="1" class="td1" rowspan="1">
                  <el-input :type="isPdf ? 'string' : 'number'" v-model="item.yangsqsjdgd" @keydown.native="handleKeyDown($event, index + 4, 3)" :ref="`${index + 4}_3`" />
                </td>
                <td colspan="1" class="td1" rowspan="1">
                  <el-input :type="isPdf ? 'string' : 'number'" v-model="item.qinshsjdgd" @keydown.native="handleKeyDown($event, index + 4, 4)" :ref="`${index + 4}_4`" />
                </td>
                <td colspan="1" class="td1" rowspan="1">
                  <el-input
                    :type="isPdf ? 'string' : 'number'"
                    v-model="item.jianczdyl"
                    @blur="calculateWucxkyqd(index)"
                    @keydown.native="handleKeyDown($event, index + 4, 5)"
                    :ref="`${index + 4}_5`"
                  />
                </td>
                <td colspan="1" class="td1" rowspan="1">
                  <el-input :type="isPdf ? 'string' : 'number'" v-model="item.wucxkyqd" disabled />
                </td>
              </tr>
            </template>
          </tbody>
        </table>
        <table height="70" class="middle-table">
          <tr trindex="6">
            <td colspan="1" class="td1" rowspan="1" height="35">平均抗压强度(MPa)</td>
            <td colspan="1" class="td1" rowspan="1">
              <el-input v-model="form.pingjkyqd" disabled />
            </td>
            <td colspan="1" class="td1" rowspan="1">保证率(%)</td>
            <td colspan="2" class="td1" rowspan="1">
              <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baozl" @blur="calculateSaibz()" @keydown.native="handleKeyDown($event, 17, 0)" :ref="`17_0`" />
            </td>
            <td colspan="1" class="td1" rowspan="1">保证率系数Z<sub>a</sub></td>
            <td colspan="2" class="td1" rowspan="1">
              <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baozlxsza" @blur="calculateSaibz()" @keydown.native="handleKeyDown($event, 17, 1)" :ref="`17_1`" />
            </td>
            <td colspan="1" class="td1" rowspan="1">偏差系数C<sub>v</sub>(%)</td>
            <td colspan="1" class="td1" rowspan="1">
              <el-input v-model="form.piancxscv" disabled />
            </td>
          </tr>
          <tr trindex="7">
            <td colspan="1" class="td1" rowspan="1">最大值(MPa)</td>
            <td colspan="1" class="td1" rowspan="1">
              <el-input v-model="form.zuidz" disabled />
            </td>
            <td colspan="1" class="td1" rowspan="1">最小值(MPa)</td>
            <td colspan="2" class="td1" rowspan="1">
              <el-input v-model="form.zuixz" disabled />
            </td>
            <td colspan="1" class="td1" rowspan="1">标准差S</td>
            <td colspan="2" class="td1" rowspan="1">
              <el-input v-model="form.biaozcs" disabled />
            </td>
            <td colspan="1" class="td1" rowspan="1">代表值(MPa)</td>
            <td colspan="1" class="td1" rowspan="1">
              <el-input v-model="form.daibz" disabled />
            </td>
          </tr>
        </table>
        <!-- .....................................................33333333333333333................................................... -->
        <table height="50px" class="bottom-table">
          <tr>
            <td>
              <span v-if="isPdf" class="textarea-span">{{ form.fujsm }}</span>
              <el-input v-else type="textarea" :rows="2" v-model="form.fujsm" @focus="handleFocus('fujsm')" />
            </td>
          </tr>
        </table>
      </div>
      <!-- .................................44444444444............................................. -->
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">记录：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">复核：</td>
            <td align="left" width="15%"></td>
            <td width="10%">日期：</td>
            <td align="left" width="15%">
              <div style="display: inline-block; margin-left: 20px">年</div>
              <div style="display: inline-block; margin-left: 20px">月</div>
              <div style="display: inline-block ;margin-left: 20px">日</div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <bs-instrument-view ref="bsInstrumentViewRef" @select="selectInstrument"></bs-instrument-view>
    <bs-jiancyj-view ref="bsJiancyjViewRef" @select="selectJiancyj" :syType="syType"></bs-jiancyj-view>
    <bs-judge-base-view ref="bsJudgeBaseViewRef" @select="selectJudge" :syType="syType"></bs-judge-base-view>
  </div>
</template>

<script>
import { handleFocus, emptyConvert, calculateMeanvalue, calculateStandardDeviation, handleKeyDown } from "@/views/reportForms/utils";
import { listWjjhlWdclycsjBsInfo, getWjjhlWdclycsjBsInfo, delWjjhlWdclycsjBsInfo, addWjjhlWdclycsjBsInfo, updateWjjhlWdclycsjBsInfo } from "@/api/report_wjjhl/wjjhlWdclycsjBsInfo";
import BsInstrumentView from "@/views/dept/bsInstrument/BsInstrumentView.vue";
import BaQjDetailView from "@/views/sycs/baQjDetail/BaQjDetailView.vue";
import BsJiancyjView from "@/views/sycs/bsJiancyj/BsJiancyjView.vue";
import BsJudgeBaseView from "@/views/sycs/bsJudgeBase/BsJudgeBaseView.vue";
import TableLineLogMoreChart from "@/views/reportForms/components/TableLineLogMoreChart.vue";
import { max, min } from "lodash";
import decimal from "@/utils/big-decimal";
import Bus from "@/utils/bus";
export default {
  name: "wdclycsj",
  components: {
    BsInstrumentView,
    BaQjDetailView,
    BsJiancyjView,
    TableLineLogMoreChart,
    BsJudgeBaseView
  },
  props: {
    excelId: {
      type: [String, Number],
      default: () => ""
    },
    syType: {
      type: [String, Number],
      default: () => ""
    },
    page: {
      type: Number,
      default: () => 0
    },
    isPdf: {
      type: Boolean,
      default: () => false
    },
    printEmpty: {
      type: Boolean,
      default: () => false
    }
  },
  data() {
    return {
      // 表单参数
      form: {
        baDetailVos: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
      },
      lingqOptions: ["3", "7", "28"]
    };
  },
  watch: {
    isPdf(newVal, oldVal) {
      this.form = { ...emptyConvert(this.form, newVal) };
    }
  },
  created() {
    this.getInfo();
  },
  methods: {
    // 获取详情
    getInfo() {
      getWjjhlWdclycsjBsInfo(this.excelId || this.$defaultExcelId).then((response) => {
        this.form = response.data;
        if (!this.form.fujsm) {
          this.form.fujsm = "附加声明：";
        }
      });
    },
    // 显示检测依据列表
    showBsJiancyjView() {
      this.$refs.bsJiancyjViewRef.init(this.form.jiancyjIds);
    },
    // 检测依据选择
    selectJiancyj(info) {
      this.form.jiancyj = info.label;
      this.form.jiancyjIds = info.ids;
      Bus.$emit("setWdclycsjBgJiancyj", { jiancyj: this.form.jiancyj, jiancyjIds: this.form.jiancyjIds });
    },
    // 显示判定依据列表
    showBsJudgeBaseView() {
      this.$refs.bsJudgeBaseViewRef.init(this.form.pandyjIds);
    },
    // 判断依据选择
    selectJudge(info) {
       this.form.pandyjIds = info.ids;
      this.form.pandyj = info.label;
    },
    // 显示仪器列表
    showBsInstrumentView() {
      this.$refs.bsInstrumentViewRef.init(this.form.shebIds);
    },
    // 仪器选择
    selectInstrument(info) {
      this.form.zhuyyqsbmcjbh = info.label;
      this.form.shebIds = info.ids;
      Bus.$emit("setWdclycsjBgZhuyyqsbmcjbh", { zhuyyqsbmcjbh: this.form.zhuyyqsbmcjbh, shebIds: this.form.shebIds });
    },
    qinsqsjzlChange(index) {
      this.calculateYangsqjdzlsh(index);
      this.calculateXisl(index);
    },
    // 计算养生期间的质量损失
    calculateYangsqjdzlsh(index) {
      // D=a-b
      const a = this.form.baDetailVos[index].yangsqsjzl;
      const b = this.form.baDetailVos[index].qinsqsjzl;
      let D = null;
      if (a && b) {
        D = decimal.subtract(a, b, 1);
      }
      this.form.baDetailVos[index].yangsqjdzlsh = D;
    },
    // 计算吸水量
    calculateXisl(index) {
      // E=c-b
      const b = this.form.baDetailVos[index].qinsqsjzl;
      const c = this.form.baDetailVos[index].qinshsjzl;
      let E = null;
      if (b && c) {
        E = decimal.subtract(c, b, 1);
      }
      this.form.baDetailVos[index].xisl = E;
    },
    // 计算无侧限抗压强度
    calculateWucxkyqd(index) {
      //E= h/17671.458
      const h = this.form.baDetailVos[index].jianczdyl;
      const g = 17671.458;
      let E = null;
      if (h) {
        E = decimal.divide(h, g, 1);
      }
      this.form.baDetailVos[index].wucxkyqd = E;
      this.calculateShiycs();
    },

    // 计算试验次数
    calculateShiycs() {
      let arr = [];
      this.form.baDetailVos.forEach((item) => {
        if (item.wucxkyqd) {
          arr.push(item.wucxkyqd);
        }
      });
      let pingjkyqd = null;
      let biaozcs = null;
      let zuidz = null;
      let zuixz = null;
      let piancxscv = null;
      if (arr.length > 1) {
        // 平均抗压强度(MPa)
        pingjkyqd = calculateMeanvalue(arr, 1);
        // 标准差
        biaozcs = calculateStandardDeviation(arr);
        //  最大值
        zuidz = max(arr);
        // 最小值
        zuixz = min(arr);
        // 计算偏差系数 W/V*100
        piancxscv = decimal.multiply(decimal.divide(biaozcs, pingjkyqd, 8), 100);
      }
      this.form.pingjkyqd = pingjkyqd;
      this.form.biaozcs = biaozcs;
      this.form.zuidz = zuidz;
      this.form.zuixz = zuixz;
      this.form.piancxscv = piancxscv;
      // 计算代表值
      this.calculateSaibz();
    },
    // 代表值（MPa）
    calculateSaibz() {
      // V-T*W
      const V = this.form.pingjkyqd;
      const T = this.form.baozlxsza;
      const W = this.form.biaozcs;
      let sum = null;
      if (V && T && W) {
        sum = decimal.subtract(V, decimal.multiply(T, W, 8), 1);
      }
      this.form.daibz = sum;
      this.setWdclycsjBgTestData();
    },
    // 传值试验数据
    setWdclycsjBgTestData() {
      const info = {
        page: this.page,
        yancsjNum: this.form.yancsjNum + "",
        daibz: this.form.daibz
      };
      Bus.$emit("setWdclycsjBgTestData", info);
      this.setWdclphbsjBgYcsj();
    },
    // 给配合比传值
    setWdclphbsjBgYcsj() {
      const info = {
        page: this.page,
        yancsjNum: this.form.yancsjNum + "",
        daibz: this.form.daibz,
        pingjkyqd: this.form.pingjkyqd,
        biaozcs: this.form.biaozcs,
        piancxscv: this.form.piancxscv,
        shejqd: this.form.shejqd
      };
      Bus.$emit("setWdclphbsjBgYcsj", info);
    },
    submitForm() {
      return this.form;
    },
    handleFocus(event) {
      handleFocus(event, this.page, this.form[event]);
    },
    handleKeyDown(event, rowIndex, colIndex) {
      const maxArr = [3, 3, 1, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1];
      const ref = handleKeyDown(event, rowIndex, colIndex, maxArr);
      if (this.$refs[ref]?.length) {
        this.$refs[ref][0].focus();
      } else if (this.$refs[ref]) {
        this.$refs[ref].focus();
      }
    }
  }
};
</script>

<style scoped>
.td1 {
  width: calc(100% / 10 * 1);
}

.td2 {
  width: calc(100% / 9 * 2);
}

.td3 {
  width: calc(100% / 9 * 3);
}

.td4 {
  width: calc(100% / 9 * 4);
}

.echarts-border {
  width: calc(210mm - 40mm - 8px);
  height: 176px;
  padding: 2px !important;
  background-color: #ffffff !important;
}
</style>
